package com.example.server.controller;

import com.example.server.entity.Vocabulary;
import com.example.server.service.VocabularyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class VocabularyController {

    @Autowired
    private VocabularyService vocabularyService;

    @GetMapping("/vocabulary")
    public List<Vocabulary> getAllVocabulary() {
        return vocabularyService.getAllVocabulary();
    }
}
